package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(60)" json:"username"`
	Password string `gorm:"type:varchar(60)" json:"password"`
}

type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:int" json:"uid"`
	Rid int `gorm:"type:int" json:"rid"`
}

type Role struct {
	gorm.Model
	Name string `gorm:"type:varchar(60)" json:"name"`
}

type RoleNode struct {
	gorm.Model
	Rid int `gorm:"type:int" json:"rid"`
	Nid int `gorm:"type:int" json:"nid"`
}

type Node struct {
	gorm.Model
	Name string `gorm:"type:varchar(60)" json:"name"`
}

//货物配送

type Cargo struct {
	gorm.Model
	CarCode string `gorm:"type:varchar(60)" json:"car_code"`
	CarName string `gorm:"type:varchar(60)" json:"car_name"`
	CarNo   string `gorm:"type:varchar(60)" json:"car_no"`
}

type Order struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(60)" json:"order_code"`
	OrderFrom string `gorm:"type:varchar(60)" json:"order_from"`
	OrderTo   string `gorm:"type:varchar(60)" json:"order_to"`
	OrderGood string `gorm:"type:varchar(60)" json:"order_good"`
	Cid       int    `gorm:"type:int" json:"cid"`
}

type CargoOrderList struct {
	OrderId   string `gorm:"type:int" json:"order_id"`
	CarCode   string `gorm:"type:varchar(60)" json:"car_code"`
	CarName   string `gorm:"type:varchar(60)" json:"car_name"`
	CarNo     string `gorm:"type:varchar(60)" json:"car_no"`
	OrderCode string `gorm:"type:varchar(60)" json:"order_code"`
	OrderFrom string `gorm:"type:varchar(60)" json:"order_from"`
	OrderTo   string `gorm:"type:varchar(60)" json:"order_to"`
	OrderGood string `gorm:"type:varchar(60)" json:"order_good"`
}

//货物仓库后台

type Path struct {
	gorm.Model
	PathCode string `gorm:"type:varchar(60)" json:"path_code"`
	PathName string `gorm:"type:varchar(60)" json:"path_name"`
}

type PathOrder struct {
	gorm.Model
	OrCode  string `gorm:"type:varchar(60)" json:"or_code"`
	OrNum   int    `gorm:"type:int" json:"or_num"`
	OrPrice int    `gorm:"type:int" json:"or_price"`
	Pid     int    `gorm:"type:int" json:"pid"`
}

type PathOrderList struct {
	PathOrderId int    `gorm:"type:int" json:"path_order_id"`
	PathCode    string `gorm:"type:varchar(60)" json:"path_code"`
	PathName    string `gorm:"type:varchar(60)" json:"path_name"`
	OrCode      string `gorm:"type:varchar(60)" json:"or_code"`
	OrNum       int    `gorm:"type:int" json:"or_num"`
	OrPrice     int    `gorm:"type:int" json:"or_price"`
}
